package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class QualifiedAsterisk implements SelectSublist {

    private int beginIndex;
    private int endIndex;
    private IdentifierChain asteriskedIdentifierChain;
    private ValueExpressionPrimary valueExpressionPrimary;
    private IdentifierList allFieldsColumnNameList;

    public QualifiedAsterisk(int endIndex, IdentifierChain asteriskedIdentifierChain) {
        this.beginIndex = asteriskedIdentifierChain.getBeginIndex();
        this.endIndex = endIndex;
        this.asteriskedIdentifierChain = asteriskedIdentifierChain;
    }

    public QualifiedAsterisk(int endIndex, ValueExpressionPrimary valueExpressionPrimary, IdentifierList allFieldsColumnNameList) {
        this.beginIndex = valueExpressionPrimary.getBeginIndex();
        this.endIndex = endIndex;
        this.valueExpressionPrimary = valueExpressionPrimary;
        this.allFieldsColumnNameList = allFieldsColumnNameList;
    }

    public QualifiedAsterisk(int endIndex, ValueExpressionPrimary valueExpressionPrimary) {
        this(endIndex, valueExpressionPrimary, null);
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierChain getAsteriskedIdentifierChain() {
        return asteriskedIdentifierChain;
    }

    public ValueExpressionPrimary getValueExpressionPrimary() {
        return valueExpressionPrimary;
    }

    public IdentifierList getAllFieldsColumnNameList() {
        return allFieldsColumnNameList;
    }

}
